home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
djgpp
/
libsrc
/
c
/
gen
/
xrealloc.c
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-06-12
|
288 b
|
18 lines
#include <stdio.h>
#include <malloc.h>
void *xrealloc(void *buf, unsigned size)
{
void *rv;
if (buf)
rv = realloc(buf, size);
else
rv = malloc(size);
if (rv == 0)
{
fprintf(stderr, "Fatal: realloc returned NULL\n");
exit(1);
}
return rv;
}